#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

int main()
{ 
  pid_t ret = fork();
  if(ret == 0)
  {
    printf("My father is %d, I am child: %d!, ret: %d, &ret: %p\n", getppid(), getpid(), ret, &ret);
    printf("---------------------------\n");
    sleep(5);
  }
  else if(ret > 0)
  {
    printf("My grandfather is %d, I am father: %d!, ret: %d, &ret: %p\n", getppid(), getpid(), ret, &ret);
    sleep(5);
    printf("****************************\n");
  }
//  while(1)
//  {
//   sleep(1);
//  }
  return 0;
}
